<template>
    <div class="project-manual-detail">
        <div class="manual-detail-header">
            <h3>{{returnData.Title}}</h3>
            <div class="manual-detail-desc">
                发布者：{{returnData.Creator}}&nbsp;&nbsp;
                类型：{{returnData.TypeName}}&nbsp;&nbsp;
                发布时间：{{returnData.CreateTime}}
            </div>
        </div>
        <div class="manual-content">
            <div v-html="returnData.Content"></div>
        </div>
        <van-toast id="van-toast" />
    </div>
</template>
<script>
    import { QXManualDetail } from '@/providers/service'
    export default {
        data() {
            return {
                returnData: {
                    title: '',
                    Creator: '',
                    CreateTime: '',
                    Content: ''
                }
            }
        },
        methods: {
            async getData() {
                let { ID } = this.$route.query
                try {
                    let res = await QXManualDetail({
                        ID
                    })
                    res.Content = res.Content.replace(/px/g, 'rpx')
                    this.returnData = res;
                } catch (error) {
                    console.log(error)
                }
            }
        },
        onShow() {
            this.getData();
        }
    }
</script>
<style>
    page {
        height: 100%;
        width: 100%;
        background: #ffffff;
    }
</style>
<style scoped lang="less">
    .project-manual-detail {
        position: relative;

        .manual-detail-header {
            height: 160rpx;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            border-bottom:1rpx solid #e0e0e3;
            h3 {
                font-size: 33rpx;
                margin-bottom: 15rpx;
            }

            .manual-detail-desc {
                font-size: 18rpx;
            }
        }

        .manual-content {
            padding: 0 28rpx;
            margin-top: 55rpx;
            font-size: 20rpx;
            line-height: 35rpx;
        }
    }
</style>
